import pymysql

# 连接到 MySQL
connection = pymysql.connect(
    host='localhost',
    user='mysql80',
    password='123456'
)

cursor = connection.cursor()

# 创建数据库,data_process.py与plagiaris_check.py中的database_name应该跟这里一样
database_name = "jizu202501"

cursor.execute(f"CREATE DATABASE IF NOT EXISTS {database_name}")
print(f"数据库 {database_name} 已创建")

# 关闭连接
cursor.close()
connection.close()
